import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15

ColumnLayout {
    spacing: 10
    RowLayout {
        spacing: 10
        Layout.bottomMargin: 10
        Label {
            Layout.alignment: Qt.AlignVCenter
            text: "系统概况"
            font.pixelSize: 60
        }
        Rectangle {
            Layout.alignment: Qt.AlignBottom
            Layout.leftMargin: 20
            Layout.bottomMargin: 12
            width: 25
            height: 25
            radius: 15
            color: server.server_running ? "green" : "red"
        }
        Label {
            Layout.alignment: Qt.AlignBottom
            text: server.server_running ? "Running" : "Error"
            font.pixelSize: 40
        }
    }
    Label {
        text: "Host IP: " + server.host_ip + ":" + server.port
        font.pixelSize: 35
    }

    Label {
        text: "Gateway IP: " + server.gateway_ip + ":" + server.port
        font.pixelSize: 35
    }

    Label {
        text: "TCP连接数: " + server.tcp_clients_count
        font.pixelSize: 35
    }

    Label {
        text: "EIS设备数: " + server.deviceList.length
        font.pixelSize: 35
    }

    Item {
        Layout.fillHeight: true
    }

    Label {
        text: "芯火征途,你好AI！"
        color: "grey"
        font.pixelSize: 35
    }
}
